
package com.badboy.mycarbon.login.handler;

import com.badboy.mycarbon.login.common.ResponseResult;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RestControllerAdvice;

@RestControllerAdvice
public class GlobalExceptionHandler {

    @ExceptionHandler(RuntimeException.class)
    public ResponseResult<?> handleRuntimeException(RuntimeException e) {
        return ResponseResult.fail(500, e.getMessage());
    }
}
